<?php
class Sosweb_Util_Filter_TimeFilter implements Zend_Filter_Interface
{
	public function filter($value)
    {
    	if (stripos($value, 'AM') > 0)
    	{
    		return str_replace('AM', '', $value);
    	}
    	elseif (stripos($value, 'PM') > 0)
    	{
    		$tmp_time = str_replace('PM', '', $value);
    		$hour = substr($tmp_time, 0, stripos($value, ':')-1);
    		$mins = substr($tmp_time, stripos($value, ':'));
    		$hour = $hour+12;
    		    		
    		return trim($hour.$mins);
    	}
    	else
    	{
			return $value;    		
    	}
    }
}
?>